<?php
return [
    /* Server 1 */
    [
        'DOMAIN' => '0.0.0.0', /* 服务监听IP地址 */
        'PORT' => '8888', /* 服务监听端口号 */
        'CHARSET' => 'utf-8', /* 默认编码格式 */
        'EXT_TYPE' => [ /* 文件后缀对应响应类型 */
            'htm' => 'text/html',
            'html' => 'text/html',
            'txt' => 'text/plain',
            'js' => 'text/javascript',
            'json' => 'application/json',
            'css' => 'text/css',
            'jpeg' => 'image/jpeg',
            'jpg' => 'image/jpeg',
            'png' => 'image/png',
            'gif' => 'image/gif',
            'bmp' => 'image/bmp',
            'ico' => 'image/x-icon',
            'icon' => 'image/x-icon',
            '*' => 'application/octet-stream'
        ],
        'DEFAULT_INDEX' => 'index.php', /* 默认首页文件 */
        'PHP_EXT' => ['php','phtml'], /* php脚本后缀 */
        'SESSION_SAVE_PATH' => '/session', /* session文件存放目录 */
        'SESSION_NAME' => 'PHPSESSION', /* session的cookie名称 */
        /*
         * routers rewrite url to file
         * 'cond' is the condition of rewrite, use php function
         * 'rules' is the rule of preg_replace for url
         * 'rewrite' is the rewrite result of url
         * */
        'routers' => [
            [
                'cond' => [
                    '!file_exists'
                ],
                'rules' => '/^(.*)$/',
                'rewrite' => '/index.php$1'
            ]
        ]
    ],
    /* Server 2 */
    [
        'DOMAIN' => '0.0.0.0', /* 服务监听IP地址 */
        'PORT' => '8887', /* 服务监听端口号 */
        'CHARSET' => 'utf-8', /* 默认编码格式 */
        'EXT_TYPE' => [ /* 文件后缀对应响应类型 */
            'htm' => 'text/html',
            'html' => 'text/html',
            'txt' => 'text/plain',
            'js' => 'text/javascript',
            'json' => 'application/json',
            'css' => 'text/css',
            'jpeg' => 'image/jpeg',
            'jpg' => 'image/jpeg',
            'png' => 'image/png',
            'gif' => 'image/gif',
            'bmp' => 'image/bmp',
            'ico' => 'image/x-icon',
            'icon' => 'image/x-icon',
            '*' => 'application/octet-stream'
        ],
        'DEFAULT_INDEX' => 'index.php', /* 默认首页文件 */
        'PHP_EXT' => ['php','phtml'], /* php脚本后缀 */
        'SESSION_SAVE_PATH' => '/session', /* session文件存放目录 */
        'SESSION_NAME' => 'PHPSESSION', /* session的cookie名称 */
        /*
         * routers rewrite url to file
         * 'cond' is the condition of rewrite, use php function
         * 'rules' is the rule of preg_replace for url
         * 'rewrite' is the rewrite result of url
         * */
        'routers' => [
            [
                'cond' => [
                    '!file_exists'
                ],
                'rules' => '/^(.*)$/',
                'rewrite' => '/index.php$1'
            ]
        ]
    ]
];